package cn.ware.house.interfaces.controller;

import cn.ware.house.interfaces.entity.Warehouse;
import cn.ware.house.interfaces.service.WarehouseService;
import org.springframework.boot.SpringApplication;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/warehouses")
public class WarehouseController {

    @Resource
    private WarehouseService warehouseService;
    @ResponseBody
    @GetMapping
    public List<Warehouse> findAllWarehouses() {
        return warehouseService.findAllWarehouses();
    }
}
